package com.pronhub.cloud.shop.feign;

import com.pronhub.cloud.shop.domain.Good;
import com.pronhub.cloud.shop.feign.hystrix.GoodFeignHystrix;
import com.pronhub.shop.cloud.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
//失败了走降级的方法
@FeignClient(name = "good-server",fallback = GoodFeignHystrix.class)
public interface GoodFeignApi {
    @RequestMapping("queryByIds")
    Result<List<Good>> query(@RequestParam("ids") List<Long> ids);
    //想到可能不成功 走一个降级的方法
}
